<?php

require_once 'Pipes/Value/Template/NameableToControllerName.php';
require_once 'PipesImpl/Config.php';

class PipesCore_Helpers_Action
{
	private $_base_uri = '';
	public function __construct(PipesImpl_Config $config) {
		$this->_base_uri = $config->base_uri;
	}

	public function factory($action, PipesImpl_Nameable $namedObject) {
		$convertedName = new Pipes_Value_Template_NameableToControllerName($namedObject);
		return "{$this->_base_uri}{$convertedName->value}/{$action}";
	}
}
